-- GENERATED SPELL FOR [Faceless Horror] --


function spell0_33772(pUnit, Event) --@Death Grip,n/a--
pUnit:FullCastSpellOnTarget(64429,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_33772', 531, 1)
end

function spell1_33772(pUnit, Event) --@Shadow Crash,n/a--
pUnit:FullCastSpellOnTarget(63722,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_33772', 1000, 1)
end

function spell2_33772(pUnit, Event) --@Void Barrier,Self--
pUnit:FullCastSpellOnTarget(63710,pUnit)
pUnit:RegisterEvent('Sorts_33772', 654, 1)
end

function spell3_33772(pUnit, Event) --@Void Wave,Self--
pUnit:FullCastSpellOnTarget(63703,pUnit)
pUnit:RegisterEvent('Sorts_33772', 0, 1)
end

function Sorts_33772(pUnit, Event)
local choix_sorts_33772 = math.random(0, 3)
if choix_sorts_33772 == 0 then
pUnit:RegisterEvent('spell0_33772', 1, 1)
end
if choix_sorts_33772 == 1 then
pUnit:RegisterEvent('spell1_33772', 1, 1)
end
if choix_sorts_33772 == 2 then
pUnit:RegisterEvent('spell2_33772', 1, 1)
end
if choix_sorts_33772 == 3 then
pUnit:RegisterEvent('spell3_33772', 1, 1)
end
end

function mob33772_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_33772', math.random(1500, 3000), 1)
end

function mob33772_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob33772_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob33772_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(33772, 1, 'mob33772_Action')
RegisterUnitEvent(33772, 2, 'mob33772_Leave')
RegisterUnitEvent(33772, 3, 'mob33772_Kill')
RegisterUnitEvent(33772, 4, 'mob33772_Die')
